local player = owner local character = player.Character local buildevent = Instance.new("RemoteEvent", player.PlayerGui) buildevent.Name = "buildevent" local cycleevent = Instance.new("RemoteEvent", player.PlayerGui) cycleevent.Name = "cycleevent" local displayevent = Instance.new("RemoteEvent", player.PlayerGui) displayevent.Name = "displayevent" local tool = Instance.new("Tool", player.Backpack) tool.RequiresHandle = nil tool.Name = "Build" local wall = Instance.new("Part") wall.Size = Vector3.new(8, 6, 2) wall.Anchored = true wall.BrickColor = BrickColor.new("Persimmon") wall.Material = Enum.Material.Brick local truss = Instance.new("TrussPart") truss.Size = Vector3.new(2, 6, 2) truss.Anchored = true truss.BrickColor = BrickColor.new("Medium stone grey") truss.Material = Enum.Material.CorrodedMetal local panel = Instance.new("Part") panel.Size = Vector3.new(8, 1, 8) panel.Anchored = true panel.BrickColor = BrickColor.new("Burgundy") panel.Material = Enum.Material.WoodPlanks local door = Instance.new("Part") door.Size = Vector3.new(4, 6, 2) door.CanCollide = false door.Anchored = true door.BrickColor = BrickColor.new("Earth orange") door.Material = Enum.Material.Wood local structures = {wall, truss, panel, door} local pointer = 1 local selection = structures[1] buildevent.OnServerEvent:Connect(function(p, hit, rot) if tool.Parent == character and selection then local clone = selection:Clone() clone.CFrame = CFrame.new(math.floor(hit.X + 0.5), math.floor(hit.Y + 0.5) + clone.Size.Y / 2 , math.floor(hit.Z + 0.5)) * CFrame.Angles(0, math.rad(rot), 0) clone.Parent = workspace end end) cycleevent.OnServerEvent:Connect(function() pointer += 1 if pointer > #structures then pointer = 1 end selection = structures[pointer] displayevent:FireClient(player, selection.Size) end) NLS([[ local player = game.Players.LocalPlayer local character = player.Character local camera = workspace.CurrentCamera local mouse = player:GetMouse() local buildevent = player.PlayerGui:FindFirstChild("buildevent") local cycleevent = player.PlayerGui:FindFirstChild("cycleevent") local displayevent = player.PlayerGui:FindFirstChild("displayevent") local example = Instance.new("Part", workspace) example.Size = Vector3.new(8, 6, 2) example.Transparency = 1 example.CanCollide = false example.Anchored = true mouse.TargetFilter = example Instance.new("SelectionBox", example).Adornee = example local instructions = Instance.new("Hint", workspace) instructions.Text = "Press [E] to place, [Q] to cycle between parts and [R] to rotate." game:GetService("Debris"):AddItem(instructions, 10) local rotation = 0 local UserInputService = game:GetService("UserInputService") UserInputService.InputBegan:Connect(function(input, position) if UserInputService:GetFocusedTextBox() == nil then if input.UserInputType == Enum.UserInputType.Keyboard then if input.KeyCode == Enum.KeyCode.E then buildevent:FireServer(mouse.Hit, rotation) end if input.KeyCode == Enum.KeyCode.Q then cycleevent:FireServer() end if input.KeyCode == Enum.KeyCode.R then rotation = rotation + 90 end end end end) displayevent.OnClientEvent:Connect(function(size) example.Size = size end) while true do local tool = player.Character:FindFirstChildWhichIsA("Tool") if tool and tool.Name == "Build" then example.Parent = workspace else example.Parent = nil end example.CFrame = CFrame.new(math.floor(mouse.hit.X + 0.5), math.floor(mouse.hit.Y + 0.5) + example.Size.Y / 2 , math.floor(mouse.hit.Z + 0.5)) * CFrame.Angles(0, math.rad(rotation), 0) task.wait() end ]], player.PlayerGui)